package org.vestbjergbyggecenter.Model;

public class SubOrder {
	Product product;
	int quantity;
	double discountedPrice;
	double fullPrice;
	
	public SubOrder(Product product, int quantity) 
	{		
		this.product = product;	
		this.quantity=quantity;
		this.discountedPrice=(product.getProductDiscountPrice())*quantity;
		this.fullPrice=(product.getOriginalPrice())*quantity;
	}
	
	public int getQuantity() {
		return quantity;
	}
	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}
	
	//method to return the discounted price of the sub order
	public double getDiscountedPrice()
	{
		return discountedPrice;
	}
	
	//method to return the full price of the sub order
	public double getFullPrice()
	{
		return fullPrice;
	}
	
	public void print()
	{
		product.print();
		System.out.println(quantity);		
		System.out.println("Price: "+ getFullPrice());
	}
}
